//
//  TBRConsumeDetailC.m
//  TBRentClient
//
//  Created by tonbright on 2018/5/2.
//  Copyright © 2018年 tonbright. All rights reserved.
//

#import "TBRConsumeDetailC.h"
#import "TBRConsumeDetailCell.h"
@interface TBRConsumeDetailC ()<UITableViewDelegate, UITableViewDataSource>
@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property (nonatomic,strong)NSMutableArray *dataArray;

@end

@implementation TBRConsumeDetailC

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupUI];
    [self loadData];
}
- (void)setupUI {
    //设置导航条
    [self setupNavItem];
    
    //添加tableView
    [self setupTableView];
}

- (void)setupNavItem {
    self.titleText = @"消费明细";
}

- (void)setupTableView {
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    self.tableView.tableFooterView = [UIView new];
    [self.tableView registerNib:[UINib nibWithNibName:@"TBRConsumeDetailCell" bundle:nil] forCellReuseIdentifier:@"TBRConsumeDetailCellId"];
    if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) {
        [self.tableView setSeparatorInset:UIEdgeInsetsMake(0, -45, 0, 0)];
    }
    self.tableView.showsVerticalScrollIndicator = NO;
    
}

#pragma mark - 返回组
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

#pragma mark - 返回行
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 8;
}

#pragma mark - 返回每行内容
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    TBRConsumeDetailCell *cell = [tableView dequeueReusableCellWithIdentifier:@"TBRConsumeDetailCellId" forIndexPath:indexPath];
    return cell;
}


- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 76;
}


- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
}


// MARK: - 加载数据
- (void)loadData {
    [self loadNetData];
}

// MARK: - 获取网络数据-----
- (void)loadNetData {
    
}

@end
